import express from 'express';
import bodyParser from 'body-parser';
import { createRouter } from './routers/index';

const app = express();



export const startApp = ()=>{
  
  app.use(bodyParser.json());
  
  app.use(bodyParser.urlencoded({ extended: true }));
  
  createRouter(app);

  app.use(express.static('public'));
  
  return app;
}
